package com.twu.biblioteca;

public class BookOrderMenuItem extends MenuItem{

    public BookOrderMenuItem(BibliotecaApp bibliotecaAppObject)
    {
        super("Order a book", bibliotecaAppObject);
    }

    @Override
    public void takeAction() {
        //takes Action for menu item to Check membership details

        if(!bibliotecaAppObject.libraryObject.checkLoggedInCurrentUser())
            bibliotecaAppObject.libraryObject.userLogIn();
        if(bibliotecaAppObject.libraryObject.checkLoggedInCurrentUser())
            bibliotecaAppObject.libraryObject.placeOrder();
    }
}
